package com.lmabbe.common.datasources.mapper;

import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Param;

/**
 * @author lmabbe
 */
public interface InitUserMapper {


    /**
     * 初始化租户管理员
     *
     * @param username
     * @param password
     * @param defaultAvatar
     */
    @Insert("INSERT INTO sys_user (user_id, user_name, user_avatar, user_account, user_password, org_id, readonly) " +
            "VALUES (1, '初始管理员', #{defaultAvatar}, #{username}, #{password}),1,b'1'")
    void initUser(@Param("username") String username,
                  @Param("password") String password,
                  @Param("defaultAvatar") String defaultAvatar);
}
